/*!
 * Copyright (c) 2012
 * Automation and Robotics Lab (LARA) at University of Brasilia (UnB)
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *     - Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     - Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     - Neither the name of the Automation and Robotics Lab (LARA) nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License LGPL as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License LGPL for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License LGPL along with this program.
 * If not, see <http://www.gnu.org/licenses/>.
 *
 *****************************************************************
 *
 *   Author:    Murilo M. Marinho, email: murilomarinho@lara.unb.br
 *
 *****************************************************************/

#ifndef ROSPKG_SCHUNK_HIGH_GMATRIX_PLUS_H_
#define ROSPKG_SCHUNK_HIGH_GMATRIX_PLUS_H_


#include"gmatrix.h"
#include"gmatrix_linalg.h"
#include"dualquaternion.h"


#ifdef __cplusplus
extern "C" {
#endif

extern void PGMATRIX_SET_COLUMN_BY_DQ(PGMATRIX Pmat, int col, DQ* dq);

extern PGMATRIX PGMATRIX_CREATE_DIAG_FROM_ARRAY(int Dim, GMATRIX_FLOAT* Array);

extern PGMATRIX PGMATRIX_CREATE_FROM_ARRAY(int Nr, int Nc, GMATRIX_FLOAT* Array);

extern PGMATRIX PGMATRIX_CREATE_ZEROES(int Nr, int Nc);

extern PGMATRIX PGMATRIX_SUBTRACT_COPY_FREE(PGMATRIX pMatA, PGMATRIX pMatB, int freeA, int freeB);

extern PGMATRIX PGMATRIX_ADD_COPY_FREE(PGMATRIX pMatA, PGMATRIX pMatB, int freeA, int freeB);

extern PGMATRIX PGMATRIX_MULTIPLY_COPY_FREE(PGMATRIX pMatA, PGMATRIX pMatB, int freeA, int freeB);

extern PGMATRIX PGMATRIX_MULTIPLY_CONST_COPY_FREE(PGMATRIX pMat, GMATRIX_FLOAT a, int freeMat);

extern PGMATRIX PGMATRIX_PSEUDOINVERSE_PLUS(PGMATRIX pA);

extern PGMATRIX PGMATRIX_DAMPED_LEASTSQUARES_PSEUDOINVERSE(PGMATRIX pMat, double k);

extern PGMATRIX PGMATRIX_RIGHT_PSEUDOINVERSE(PGMATRIX pMat);

extern PGMATRIX PGMATRIX_RIGHT_PSEUDOINVERSE_NULLSPACE_PROJECTOR(PGMATRIX pMat);

#ifdef __cplusplus
}
#endif

#endif  // ROSPKG_SCHUNK_HIGH_GMATRIX_PLUS_H_
